//
//  CHDMainTableBarVC.m
//  IOSWeiiPhoneNews
//
//  Created by ibokan on 14-4-23.
//  Copyright (c) 2014年 chen. All rights reserved.
//

#import "CHDMainTableBarVC.h"
#import "CHDHomeVC.h"
#import "CHDiPhoneSVC.h"
#import "CHDBlogVC.h"
#import "CHDMoreVC.h"
#import "CHDBaseUINavigationVC.h"

@interface CHDMainTableBarVC ()

@end

@implementation CHDMainTableBarVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    CHDHomeVC *homeVC = [[CHDHomeVC alloc]init];
    UINavigationController *homeNav = [[UINavigationController alloc]initWithRootViewController:homeVC];
    UITabBarItem *item1 = [[UITabBarItem alloc]initWithTitle:@"首页" image:[UIImage imageNamed:@"home_tab_icon_1"] selectedImage:[UIImage imageNamed:@"home_tab_icon_1_selected"]];
    homeNav.tabBarItem = item1;
    
    
    CHDiPhoneSVC *headVC = [[CHDiPhoneSVC alloc]init];
    UINavigationController *headNav = [[UINavigationController alloc]initWithRootViewController:headVC];
    UITabBarItem *item2 = [[UITabBarItem alloc]initWithTitle:@"科技" image:[UIImage imageNamed:@"toolbar_favorite"] selectedImage:[UIImage imageNamed:@"toolbar_favorite_highlighted"]];
    headNav.tabBarItem = item2;
    
    CHDBlogVC *tenchVC = [[CHDBlogVC alloc]init];
    UINavigationController *tenchNav = [[UINavigationController alloc]initWithRootViewController:tenchVC];
    UITabBarItem *item3 = [[UITabBarItem alloc]initWithTitle:@"博文" image:[UIImage imageNamed:@"home_tab_icon_4"] selectedImage:[UIImage imageNamed:@"home_tab_icon_4_selected"]];
    tenchNav.tabBarItem = item3;
    
    CHDMoreVC *blogVC = [[CHDMoreVC alloc]init];
    UINavigationController *blogNav = [[UINavigationController alloc]initWithRootViewController:blogVC];
    UITabBarItem *item4 = [[UITabBarItem alloc]initWithTitle:@"更多" image:[UIImage imageNamed:@"tabbar_more"] selectedImage:[UIImage imageNamed:@"tabbar_more_selected"]];
    blogNav.tabBarItem = item4;
    
    NSArray *viewControlls = @[homeNav,headNav,tenchNav,blogNav];
    self.viewControllers = viewControlls;

    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
